package com.pubinfo.passbook.common.model.http.eip;

import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;
import lombok.SneakyThrows;

/**
 * EIP登录用户信息
 *
 * @author zhouch
 * @date 2021/11/22 14:41
 */
@Data
public class UserInfo {

    @JSONField(name = "LoginName")
    private String username;

    @JSONField(name = "RealName")
    private String realname;

    @JSONField(name = "OrgId")
    private String orgId;

    @JSONField(name = "Jthrloginname")
    private String jthrLoginName;

    @JSONField(name = "Smsterm")
    private String smsterm;

    // 公司代码
    @JSONField(name = "nsrsbn")
    private String nsrsbh;

    public static UserInfo formStr(String userInfo) {
        return JSONObject.parseObject(userInfo, UserInfo.class);
    }

    @Override
    public String toString() {
        return JSONObject.toJSONString(this);
    }
}
